home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group93c.txt / 000066_icon-group-sender _Tue Sep 28 19:25:08 1993.msg < prev    next >
Internet Message Format  |  1994-02-02  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Mon, 4 Oct 1993 08:56:42 MST
  2. Date: 28 Sep 93 19:25:08 GMT
  3. From: cis.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!agate!linus!progress!neil@ucbvax.Berkeley.EDU  (Neil Galarneau)
  4. Organization: Progress Software Corp.
  5. Subject: Design for icon calling DLL entrypoints?
  6. Message-Id: <1993Sep28.192508.6881@progress.com>
  7. Sender: icon-group-request@cs.arizona.edu
  8. To: icon-group@cs.arizona.edu
  9. Status: R
  10. Errors-To: icon-group-errors@cs.arizona.edu
  11.  
  12. I am trying to come up with a good way for icon to access DLLs.  Dynamic
  13. Link Libraries (which exist under MS Windows and OS/2) are pieces of code
  14. that can be linked to and executed at runtime.  No modification of iconx
  15. should have to be done to call DLLs.
  16.  
  17. To access a DLL entrypoint, you need to know the name of the DLL, the name
  18. or number of the entrypoint (every entrypoint in a DLL has a number and
  19. most have a name), whether the calling convention is pascal or cdecl, and
  20. the number and types (short, long, void far *, float, double) of the arguments,
  21. and the type of the return value if any.
  22.  
  23. The obvious place to start is with the icon callout(x, x1, ..., xn) function.
  24. x could be the name of the entrypoint, but what about the other info DLL access
  25. needs?
  26.  
  27. One approach would be to define a record:
  28.    record dllEntry(dllNameOrOrdinal, callConvention, args)
  29. where dllNameOrOrdinal would be a string or integer, callConvention could
  30. be a 1 or 0 or maybe a string, and args could be a string encoding the
  31. argument and return types.
  32.  
  33. Instead of having all these dllEntry records floating all over the place,
  34. maybe we could store these records in a table called dllEntrypoints or
  35. something.
  36.  
  37. So when a callout function was executed, I would look up the name, find the
  38. associated record, and be on my way.
  39.  
  40.  
  41. What do people think?
  42.  
  43.  
  44.  
  45. Neil
  46. neil@progress.com
  47.  
  48. P.S.  Is the icon preprocessor able to turn:
  49.          sndPlaySound("tada.wav", 0)
  50. into
  51.          callout("sndPlaySound", "tada.wav", 0)
  52. ?
  53.